#ifndef file_config_item_h
#define file_config_item_h

#include "head.h"

#define EXHIBITION_ELEMENT_TYPE_MUSIC 0
#define EXHIBITION_ELEMENT_TYPE_TEXT 1
#define EXHIBITION_ELEMENT_TYPE_PICTURE 2

#define TREASURE_ICON_MUSIC_PATH @"item_sound.png"
#define TREASURE_ICON_TEXT_PATH @"item_poem.png"
#define TREASURE_ICON_IMAGE_PATH @"item_picture.png"

typedef struct SBaseDataPiece_
{
	int id;
	char path[STRING_BUF_SIZE];
}
SBaseDataPiece;

typedef struct SBaseDataWeapon_
{
	int id;
	char name[STRING_BUF_SIZE];
	char icon_path[STRING_BUF_SIZE];
	std::vector<std::string> description;
}
SBaseDataWeapon;

typedef struct SBaseDataItem_
{
	int id;
	char name[STRING_BUF_SIZE];
	char icon_path[STRING_BUF_SIZE];
	std::vector<std::string> description;
}
SBaseDataItem;

typedef struct SBaseDataExhibitionElement_
{
	int id;
	int type;
	char name[STRING_BUF_SIZE];
	char path[STRING_BUF_SIZE];
}
SBaseDataExhibitionElement;

typedef struct SBaseDataFormula_
{
	int component_a;
	int component_b;
	int product_type;
	int product_id;
}
SBaseDataFormula;

extern std::map<int, SBaseDataPiece> g_CfgPieceTable;
extern std::map<int, SBaseDataWeapon> g_CfgWeaponTable;
extern std::map<int, SBaseDataItem> g_CfgItemTable;
extern std::map<int, SBaseDataExhibitionElement> g_CfgExhibitionElementTable;
extern std::list<SBaseDataFormula> g_CfgFormulaTable;

void CfgItemLoadConfigFile(void);

#endif